//
//  XYNormalView.m
//  新项目
//
//  Created by xmy on 2017/2/28.
//  Copyright © 2017年 xmy. All rights reserved.
//

#import "XYNormalView.h"
#import "XYSecondPictureView.h"
#import "XYToolsBarView.h"


@implementation XYNormalView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self setupUI];
    }
    return self;
}

- (void)setupUI{
   
    XYSecondPictureView *secondView = [[XYSecondPictureView alloc]init];
    [self addSubview:secondView];
    
    XYToolsBarView *toolBar = [[XYToolsBarView alloc]init];
    
    [self addSubview:toolBar];
    
    [secondView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.left.right.equalTo(self);
        make.height.offset(300);
    }];
    
    [toolBar mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(secondView.mas_bottom).offset(16);
        make.left.right.equalTo(secondView);
        make.height.offset(40);
    }];

}

@end
